<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<link href="themes01/default/clientPublic.css" rel="stylesheet" type="text/css"/>
<link href="themes01/default/codeMgr.css" rel="stylesheet" type="text/css"/>
<link href="themes01/default/tabSwitch.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="javascripts01/jquery.js"></script>
<script type="text/javascript" src="javascripts01/common.js"></script>
<script language="javascript" type="text/javascript" src="DatePicker/WdatePicker.js"></script>
<title>Office 515158 2011 OA办公系统</title>
 
</head>
<body>
<div id="Holder">
<div id="MainPage">

 
 
<div id="Subnav">
 
<ul>
<?php
//定义标题
if($_GET[bbstype]!=''){
$nums=152;
}else{
$nums=150;
}
global $db;
$query = $db->query("SELECT * FROM ".DB_TABLEPRE."menu where fatherid='96' and menutype='0' ORDER BY menunum Asc");
	while ($row = $db->fetch_array($query)) {
?>
<li><a href="<?=$row[menuurl]?>&bbsclassid=<?=$_GET["bbsclass"]?>"  <? if($nums==$row[menuid]){?> id="Subnavb"<? }?>><?=$row[menuname]?></a></li>
<?php
	}
?>


</ul>
</div>
<div id="MainBody">

<form name="update" method="post" action="admin.php?ac=index&fileurl=bbs">
<div id="CodeWrap">
<div id="TabSwitch">
<ul>
<li <?php if($_GET["bbsclass"]==''){?> class="active"<?php }?>><a href="admin.php?ac=index&fileurl=bbs&bbstype=<?=$_GET[bbstype]?>">综合列表</a></li>
<?php
global $db;
$query = $db->query("SELECT * FROM ".DB_TABLEPRE."bbsclass  ORDER BY id Asc");
	while ($row = $db->fetch_array($query)) {
?>
<li <?php if($_GET["bbsclass"]==$row['id']){?> class="active"<?php }?>><a href="admin.php?ac=index&fileurl=bbs&bbsclass=<?=$row[id]?>&bbstype=<?=$_GET[bbstype]?>"><?=$row[name]?></a></li>
<?php
	}
?>



</ul>

 
</div>
<div id="CodeShowBlockWrap">
<div id="QueryBar">
<div id="FilterWrap">
<label for="FilterStatus"><table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
  <tr>
    <td width="15%"><input type="checkbox" class="checkbox" value="1" name="chkall" onClick="check_all(this)" /><b>全选</b>&nbsp;&nbsp;<input type="submit" name="do" id="button" value="删 除"/>&nbsp;&nbsp;<input type="submit" name="do" id="button" value="置 顶"/></td>
    <td width="85%" align="left">&nbsp;&nbsp;&nbsp;&nbsp;<?=showpage($num,$pagesize,$page,$url)?></td>
  </tr>
</table>
</label>
</div>
</div>

<div id="CodeShowBlock">
<table cellpadding="0" cellspacing="0" class="data-box"><thead>
<tr class="border-in">
<th width="36"><div>选项</div></th>
<th class="title"><div>标题</div></th>
<th class="status"><div>作者</div></th>
<th class="scale"><div>来源</div></th>
<th class="scale"><div>阅读次数</div></th>
<th class="scale"><div>发布时间</div></th>
<th class="scale"><div>状态</div></th>
<th class="scale"><div>发贴人</div></th>
<th class="scale"><div>版主</div></th>
<th class="status"><div>操作</div></th>
</tr>
</thead><tbody>

<?foreach ($result as $row) {?>
<?php
global $db;
$bbsclassadmin = $db->fetch_one_array("SELECT * FROM ".DB_TABLEPRE."bbsclass  WHERE id = '".$row["bbsclass"]."' and classadmin like '%".GET_INC_USER_NAME($_USER->id)."%'");

if($_USER->id==$row['uid'] && $bbsclassadmin["classadmin"]==''){
$disabled='';
}elseif($bbsclassadmin["classadmin"]!=''){
$disabled='';
}else{
$disabled='disabled';
}
?>
<tr class="data-box-row"><td width="36" align="center"><input type="checkbox" name="id[]" value="<?=$row['id']?>" class="checkbox" <?=$disabled?> /></td>
<td class="title"><a href="admin.php?ac=views&fileurl=bbs&do=edit&id=<?=$row['id']?>"><?=$row['title']?></a></td>
<td class="status"><?=$row['author']?>  </td>

<td class="scale"><?=$row["origin"]?> </td>
<td class="scale"><?=$row["readnum"]?> 次</td>
<td class="scale"><?=$row['issuedate']?></td>
<td class="scale"><?php if($row['type']=='1'){echo "<font color=#006600>待审</font>";}elseif($row['type']=='2'){echo "正常";}else{echo "<font color=red>置顶</font>";}?></td>
<td class="scale"><?=GET_INC_USER_NAME($row['uid'])?></td>
<td class="scale">
<?php
global $db;
$bbsclass = $db->fetch_one_array("SELECT * FROM ".DB_TABLEPRE."bbsclass  WHERE id = '".$row["bbsclass"]."'");
echo $bbsclass["classadmin"];
?>
</td>
<td class="scale">
<?php

if($_USER->id==$row['uid'] && $bbsclassadmin["classadmin"]==''){
echo '<a class="detail" href="admin.php?ac=edit&fileurl=bbs&do=edit&id='.$row['id'].'">编辑</a>';
}elseif($bbsclassadmin["classadmin"]!=''){
if($row["type"]=='1'){
echo '<a class="detail" href="admin.php?ac=index&fileurl=bbs&do=keys&id='.$row['id'].'">审批</a> | ';
}
echo '<a class="detail" href="admin.php?ac=edit&fileurl=bbs&do=edit&id='.$row['id'].'">编辑</a>';
}
?>
</td>
					
						
						</tr>
<?}?>


</tbody></table>
 
</div>
<div id="PageControl">
<div class="page-control">
<div class="border-in">
<table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
  <tr>
    <td width="15%">&nbsp;&nbsp;<input type="checkbox" class="checkbox" value="1" name="chkall" onClick="check_all(this)" /><b>全选</b>&nbsp;&nbsp;<input type="submit" name="do" id="button" value="删 除"/>&nbsp;&nbsp;<input type="submit" name="do" id="button" value="置 顶"/></td>
    <td width="85%" align="left">&nbsp;&nbsp;&nbsp;&nbsp;<?=showpage($num,$pagesize,$page,$url)?></td>
  </tr>
</table>
  

</div>
</div>
</div>
</div>
</div>
 </form>
</div>
</div>
</div>
 
<script language="javascript" src="javascripts01/tangram-1.3.1.js" type="text/javascript"></script>
<script language="javascript" src="javascripts01/elf.js" type="text/javascript"></script>
<script language="javascript" src="javascripts01/union.js" type="text/javascript"></script>
<script language="javascript" src="javascripts01/codeMgr.js" type="text/javascript"></script>
 
</body>
</html>
